Skip to content

Conversation

ryanzomorrodi
Copy link
Contributor

@ryanzomorrodi ryanzomorrodi commented Jul 10, 2025

Currently, the pkgdown site does not render equations well because the default math rendering engine, mathml, does a pretty poor job of rendering.

See: https://pkgdown.r-lib.org/articles/customise.html#math-rendering

Example: https://r-spatial.github.io/spdep/reference/moran.html
image

With mathjax:
image

@ryanzomorrodi ryanzomorrodi changed the title H Add Mathjax math rendering to pkgdown site Jul 10, 2025
@rsbivand
Copy link
Member

@ryanzomorrodi Could you please motivate this PR with particular reference to how the change impacts platforms without Mathjax. Thanks for exploring this!

@ryanzomorrodi
Copy link
Contributor Author

Hi @rsbivand ! I'm not entirely sure what you mean. Mathjax is a javascript library which is bundled with the pkgdown site when its built with math-rendering set to mathjax. You can find it inside: the docs\deps\MathJax-3.2.2 folder. If the user has turned off javascript, the website returns back to its current state.

When you disable javascript:
image

@rsbivand rsbivand merged commit e3e6199 into r-spatial:main Jul 16, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants